﻿@model FruitCake.SimpleGallery.ViewModels.SimpleGalleryPartEditViewModel
@{
    // Style.Include("zengallery.css");
}
<fieldset>
    <legend></legend>
    @Html.LabelFor(m=>m.Path, T("Media folder path"))
    @Html.TextBoxFor(m => m.Path, new { @class = "text-box textMedium" })
    
    @if (!String.IsNullOrWhiteSpace(Model.Path) && Model.ImageCount > 0) {
        
        @Html.ActionLink(T("Manage this folder").Text,
            "Edit", "Admin", new {
                area = "Orchard.Media",
                name = Path.GetDirectoryName(Model.Path),
                mediaPath = Model.Path
            },
            null
        )
        <br />
        <strong>@T("Images count: {0} - Current folder: {1}", Model.ImageCount, Model.Path)</strong>
        <p>
            @foreach (var image in Model.FirstImages) {
                <img class="thumbnail" src="@image.ThumbnailResolvedPath" alt="@image.Name" style="max-width: 100px; max-height:80px; margin: 0px 2px;"/>
            }
        </p>
    }

    @Html.LabelFor(m=>m.PageSize, T("Page size"))
    @Html.TextBoxFor(m => m.PageSize, new { @class = "text text-small" })
    @Html.LabelFor(m=>m.PagerMaxItems, T("Maximun pager items"))
    @Html.TextBoxFor(m => m.PagerMaxItems, new { @class = "text text-small" })
</fieldset>
<fieldset>
    <legend></legend>
    @Html.LabelFor(m=>m.FrameWidth, T("Frame width"))
    @Html.TextBoxFor(m => m.FrameWidth, new { @class = "text text-small" })
    @Html.LabelFor(m=>m.FrameHeight, T("Frame height"))
    @Html.TextBoxFor(m => m.FrameHeight, new { @class = "text text-small" })
    @Html.LabelFor(m=>m.EnableThumbnail, T("Enable thumbnail"))      @*forcheckbox*@
    @Html.CheckBoxFor(m => m.EnableThumbnail, new { @class = "" })
    @Html.LabelFor(m => m.TitleMode, T("Title mode"))
    @Html.DropDownListFor(m => m.TitleMode, Model.PrepareTitleModeList())
    @Html.LabelFor(m => m.TitleSeparator, T("Title separator"))
    @Html.TextBoxFor(m => m.TitleSeparator, new { @class = "text text-small" })
    @Html.LabelFor(m => m.LinkMode, T("Link mode"))
    @Html.DropDownListFor(m => m.LinkMode, Model.PrepareLinkModeList())
</fieldset>
